package com.fushenlan.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

/**
 * 核酸检测申请记录快照表
 * @TableName nuclein_detection_apply_record_relation
 */
@TableName("nuclein_detection_apply_record_relation")
public class NucleinDetectionApplyRecordRelation implements Serializable {
    /**
     * 
     */
    @TableId(value = "id",type = IdType.AUTO)
    private Long id;

    /**
     * 核酸检测申请记录id
     */
    @TableField(value = "detection_apply_id")
    private Long detectionApplyId;

    /**
     * 1-全部小区 2-指定小区 3-指定检测人员 4-阳性及密接人员
     */
    @TableField(value = "detection_type")
    private Integer detectionType;

    /**
     * 小区/人员 id
     */
    @TableField(value = "relation_id")
    private String relationId;

    /**
     * 
     */
    @TableField(value = "create_user")
    private String createUser;

    /**
     * 
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 
     */
    @TableField(value = "update_user")
    private String updateUser;

    /**
     * 
     */
    @TableField(value = "update_time")
    private Date updateTime;

    private static final long serialVersionUID = 1L;

    /**
     * 
     */
    public Long getId() {
        return id;
    }

    /**
     * 
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 核酸检测申请记录id
     */
    public Long getDetectionApplyId() {
        return detectionApplyId;
    }

    /**
     * 核酸检测申请记录id
     */
    public void setDetectionApplyId(Long detectionApplyId) {
        this.detectionApplyId = detectionApplyId;
    }

    /**
     * 1-全部小区 2-指定小区 3-指定检测人员 4-阳性及密接人员
     */
    public Integer getDetectionType() {
        return detectionType;
    }

    /**
     * 1-全部小区 2-指定小区 3-指定检测人员 4-阳性及密接人员
     */
    public void setDetectionType(Integer detectionType) {
        this.detectionType = detectionType;
    }

    /**
     * 小区/人员 id
     */
    public String getRelationId() {
        return relationId;
    }

    /**
     * 小区/人员 id
     */
    public void setRelationId(String relationId) {
        this.relationId = relationId;
    }

    /**
     * 
     */
    public String getCreateUser() {
        return createUser;
    }

    /**
     * 
     */
    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    /**
     * 
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 
     */
    public String getUpdateUser() {
        return updateUser;
    }

    /**
     * 
     */
    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser;
    }

    /**
     * 
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * 
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        NucleinDetectionApplyRecordRelation other = (NucleinDetectionApplyRecordRelation) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getDetectionApplyId() == null ? other.getDetectionApplyId() == null : this.getDetectionApplyId().equals(other.getDetectionApplyId()))
            && (this.getDetectionType() == null ? other.getDetectionType() == null : this.getDetectionType().equals(other.getDetectionType()))
            && (this.getRelationId() == null ? other.getRelationId() == null : this.getRelationId().equals(other.getRelationId()))
            && (this.getCreateUser() == null ? other.getCreateUser() == null : this.getCreateUser().equals(other.getCreateUser()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateUser() == null ? other.getUpdateUser() == null : this.getUpdateUser().equals(other.getUpdateUser()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getDetectionApplyId() == null) ? 0 : getDetectionApplyId().hashCode());
        result = prime * result + ((getDetectionType() == null) ? 0 : getDetectionType().hashCode());
        result = prime * result + ((getRelationId() == null) ? 0 : getRelationId().hashCode());
        result = prime * result + ((getCreateUser() == null) ? 0 : getCreateUser().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateUser() == null) ? 0 : getUpdateUser().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", detectionApplyId=").append(detectionApplyId);
        sb.append(", detectionType=").append(detectionType);
        sb.append(", relationId=").append(relationId);
        sb.append(", createUser=").append(createUser);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateUser=").append(updateUser);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}